import request from '@/utils/request'

export function getMobileCode(data) {
  return request({
    url: '/codes',
    method: 'post',
    data,
  })
}

// 验证验证码
export function validMobileCode(data) {
  return request({
    url: '/codes/valid',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    data
  })
}

//忘记密码
export function forgetPsw(data) {
  return request({
    url: '/user/password',
    method: 'put',
    params:data
  })
}


//获取手机号
export function getPhone(data) {
  return request({
    url: '/user/pwd-back',
    method: 'get',
    params:data
  })
}

//验证码验证
export function validCode(data) {
  return request({
    url: '/user/pwd-back',
    method: 'post',
    data
  })
}

//修改密码
export function rePwd(data) {
  return request({
    url: '/user/pwd-back',
    method: 'put',
    data
  })
}
